<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<table class="cntable table table-bordered dataTable table-billing">
<!-- <c:import url="commonStat.jsp" /> -->
	<thead>
		<tr>
			<th style="width:50px">序号</th>
			<th style="width:120px">订单号</th>
			<th style="width:120px">客户名称</th>
			<th style="width:120px">货品数量</th>
			<th style="width:120px">货物种类数</th>   
			<th style="width:120px">尚欠数</th> 
			<th style="width:120px">订单金额</th>
			<th style="width:120px">已付金额</th>
			<th style="width:120px">未付金额</th>
			<th style="width:120px">付款状态</th>
			<th style="width:120px">审核状态</th>
			<th style="width:120px">货品状态</th>
			<th style="width:120px">开单人</th>
			<th style="width:120px">开单日期</th>
			<th>备注</th>  
		</tr>
	</thead>
	<tbody>
		<c:forEach var="billing" items="${billings}" varStatus="status">
			
			<tr data-id="${billing.billingId}" data-billingState="${billing.billingState}" data-outStockDebt="${billing.outStock.outStockDebt}" data-outStockNum="${billing.outStock.outStockNum}" data-confirm="${billing.confirm}">
				<td>${status.index+1}</td>
				<td>${billing.billingNo}</td>
				<td>${billing.customer.customerName}</td>
				<td>${billing.outStock.outStockNum}</td>
				<td>${billing.outStock.outStockTypeNum}</td>
				<td>${billing.outStock.outStockDebt}</td>
				<td><fmt:formatNumber value="${billing.billingMoney}" pattern="0.00"></fmt:formatNumber></td>
				
				
				<td><fmt:formatNumber value="${billing.paidAmount}" pattern="0.00"></fmt:formatNumber></td>
				<td><fmt:formatNumber value="${billing.unpaidAmount}" pattern="0.00"></fmt:formatNumber></td>
			
				<td ><t:provider packageName="billing" enumClassName="PayState" value="${billing.payState}"/></td>
				<td><t:provider packageName="billing" enumClassName="BillingConfirm" value="${billing.confirm}"/></td>
				
				<c:if test="${billing.billingState=='notShipped'}">
					<td style="background-color: #007aff;color:white"><t:provider packageName="billing" enumClassName="BillingState" value="${billing.billingState}"/></td>
				</c:if>
				<c:if test="${billing.billingState=='completed'}">
					<td style="background-color: #00E067;color:white"><t:provider packageName="billing" enumClassName="BillingState" value="${billing.billingState}"/></td>
				</c:if>
				<td>${billing.createUserName}</td>
				<td style="width:100px">
						<fmt:formatDate value="${billing.createDate}" type="date" dateStyle="default" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>${billing.comment}</td>

			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
		<tr>
			<th class="pager-th">
				<%@ include file="/WEB-INF/views/shared/master/pager.jsp"%>
			</th>
		</tr>
	</tfoot>
</table>
